#pragma once

#include "MWCore.h"
#include "MWRenderDefine.h"

namespace Myway
{

class MW_ENTRY Texture : public RefObj
{
	DECLARE_ALLOC();

public:
    Texture();
    virtual ~Texture();

    virtual void Lock(LockedRect * pLockedBox, int LockFlags) = 0;
    virtual void Unlock() = 0;

	const TString128 & GetName() const;
	const TString128 & GetSourceName() const;
	int GetWidth() const;
	int GetHeight() const;
	int GetMipLevels() const;
	USAGE GetUsage() const;
	PIXEL_FORMAT GetFormat() const;

protected:
    TString128 mName;
	TString128 mSourceName;
    int mWidth;
    int mHeight;
    int mMipLevels;
    USAGE mUsage;
    PIXEL_FORMAT mFormat;
	bool mRenderTarget;
};

DeclareSmartPtr(Texture);

}